from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from google.appengine.ext.webapp import template
from google.appengine.api import mail


from django.utils import simplejson


import web
import api


# Register the URL with the responsible classes
application = webapp.WSGIApplication(
    [('/', web.MainPage),
    ('/api/tester/', web.Api),
    ('/api/users/create/', api.UserCreate),
    ('/api/users/', api.UsersGet),
    ('/api/group/create/', api.GroupCreate),
    ('/api/group/delete/', api.GroupDelete),
    ('/api/group/join/', api.GroupJoin),
    ('/api/group/users/', api.GroupUsers),
    ('/api/group/acceptuser/', api.GroupAcceptUser),
    ('/api/groups/', api.GroupsGet),
    ('/api/task/create/', api.TaskCreate),
    ('/api/task/set_checked/', api.TaskSetChecked),
    ('/api/tasks/', api.TasksGet),
    ('/api/message/create/', api.MessageCreate),
    ('/api/messages/', api.MessagesGet),
    ],
    debug=True)

# Register the wsgi application to run
def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()